﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>欢喜过新年,拼手气分2亿</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <script src="http://cdn.iyaoread.com/js/jquery-1.8.1.min.js"></script>
    <link rel="stylesheet" href="css/payment.css"/>
</head>
<body style="background: #ffe600">
<div style="margin-bottom: 44px">
    <div class="a_d1">
       <img class="a_i1" src="http://yuedupic.iyaoread.com/hongbao/dailibeijing22.png" alt="" style=""/>
        <div class="a_d2">
            恭喜您成为本活动的代理,分享即可获得支付金额10%佣金
        </div>
        <div class="a_d3" id="qrcodeTable"></div>
    </div>
    <div class="a_d4">
        <div class="a_d5">
            扫此二维码付款1元、5元、10元，本号将自动发送一个红包给您，金额1-200元，随机发送每天本号还派有更多福利随机发出，快来试试手气吧！
        </div>
    </div>
    <div><img src="http://yuedupic.iyaoread.com/hongbao/dailibottom.png" alt="" style="width: 100%;"/></div>
</div>
<footer>
    <a href="index.html"><img src="http://yuedupic.iyaoread.com/hongbao/qiangUn.png" alt=""/></a>
    <a href="grabMoney.html"><img src="http://yuedupic.iyaoread.com/hongbao/payUn.png" alt=""/></a>
    <a href="Commission.html"><img src="http://yuedupic.iyaoread.com/hongbao/yongJUn.png" alt=""/></a>
    <a><img src="http://yuedupic.iyaoread.com/hongbao/dailiOn.png" alt=""/></a>
    <a href="service.html"><img src="http://yuedupic.iyaoread.com/hongbao/kefuUn.png" alt=""/></a>
</footer>
</body>
<script src="js/jquery.qrcode.js"></script>
<script src="http://cdn.iyaoread.com/js/qrcode.js"></script>
<script>
$(document).ready(function(){
	$.ajax({
        type: 'GET',
        url: "./activity/agent",
        dataType:"json",
        success:function(data){
          if(data.code==0){
        	  var time =  screen.width;
        	    if(time<330){
        	        $("canvas").css('width','100');
        	        $(".a_d3").css({marginLeft : '-50px',width: '110px',height: '110px'});
        	    } if(time>321&&time<376){
        	        $("canvas").css('width','120');
        	        $(".a_d3").css({marginLeft : '-60px',width: '130px',height: '130px'});
        	    }if(time>376&&time<415){
        	        $("canvas").css('width','120');
        	        $(".a_d3").css({marginLeft : '-60px',width: '130px',height: '130px'});
        	    }if(time>415){
        	    	 $("canvas").css('width','130');
         	        $(".a_d3").css({marginLeft : '-65px',width: '140px',height: '140px'});
        	    }
        	  $("#qrcodeTable").qrcode({
        			render	: "canvas",
        			text	: data.data,
        			 width:"120",
        		     height:"120"
        		
        		});	
          }else{
        	  alert(data.data);
          }
        },
        error:function(data){
            alert("请求失败！");
        }
    });
});
function toDecimal(x) { 
    var f = parseFloat(x); 
    if (isNaN(f)) { 
      return; 
    } 
    f = Math.round(x*100)/100; 
    return f; 
}
</script>
</html>